package cn.com.yusys.yusp.message.domain;

import cn.com.yusys.yusp.commons.mapper.domain.BaseDomain;
import java.io.Serializable;
import javax.persistence.*;

@Table(name = "MESSAGE_EVENT")
public class MessageEvent extends BaseDomain implements Serializable {
    @Id
    @Column(name = "EVENT_NO")
    private String eventNo;

    @Column(name = "CREATE_TIME")
    private String createTime;

    @Column(name = "MESSAGE_TYPE")
    private String messageType;

    @Column(name = "TEMPLATE_PARAM")
    private String templateParam;

    private static final long serialVersionUID = 1L;

    /**
     * @return EVENT_NO
     */
    public String getEventNo() {
        return eventNo;
    }

    /**
     * @param eventNo
     */
    public void setEventNo(String eventNo) {
        this.eventNo = eventNo == null ? null : eventNo.trim();
    }

    /**
     * @return CREATE_TIME
     */
    public String getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime
     */
    public void setCreateTime(String createTime) {
        this.createTime = createTime == null ? null : createTime.trim();
    }

    /**
     * @return MESSAGE_TYPE
     */
    public String getMessageType() {
        return messageType;
    }

    /**
     * @param messageType
     */
    public void setMessageType(String messageType) {
        this.messageType = messageType == null ? null : messageType.trim();
    }

    /**
     * @return TEMPLATE_PARAM
     */
    public String getTemplateParam() {
        return templateParam;
    }

    /**
     * @param templateParam
     */
    public void setTemplateParam(String templateParam) {
        this.templateParam = templateParam == null ? null : templateParam.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MessageEvent other = (MessageEvent) that;
        return (this.getEventNo() == null ? other.getEventNo() == null : this.getEventNo().equals(other.getEventNo()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getMessageType() == null ? other.getMessageType() == null : this.getMessageType().equals(other.getMessageType()))
            && (this.getTemplateParam() == null ? other.getTemplateParam() == null : this.getTemplateParam().equals(other.getTemplateParam()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getEventNo() == null) ? 0 : getEventNo().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getMessageType() == null) ? 0 : getMessageType().hashCode());
        result = prime * result + ((getTemplateParam() == null) ? 0 : getTemplateParam().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", eventNo=").append(eventNo);
        sb.append(", createTime=").append(createTime);
        sb.append(", messageType=").append(messageType);
        sb.append(", templateParam=").append(templateParam);
        sb.append("]");
        return sb.toString();
    }
}